Diagonalizing A Matrix With Repeated Eigenvalues